<template>
  <div>
    <el-collapse>
      <el-collapse-item  v-for="(item,index) of productAttrDoList"
        :key="index" :title='item.attrName' :name="index" style="overflow:scroll;background:#EEEEEE;">
        <div v-if="rowIndex > 0" v-for="(row,rowIndex) of saleAttr" :key="rowIndex">
          <el-row>
            <el-col :span="24" v-for="(prop,propIndex) of row.productAttrDoList" :key="propIndex">
              <div style="font-size: 15px">
                <span>{{row.attrGroupName}} :</span> <span>{{prop.attrName}}</span>
              </div>
            </el-col>
          </el-row>
        </div>
        <el-row style="margin-top: 1%">
          <el-col :span="24">
            <el-form :model="item" label-width="85px">
              <el-form-item label="商品名称">
                <el-input v-model="item.name" size="mini" type='text'></el-input>
              </el-form-item>
              <el-form-item label="标题">
                <el-input v-model="item.skuTitle" size="mini"  type='text'></el-input>
              </el-form-item>
              <el-form-item label="副标题">
                <el-input v-model="item.skuSubtitle" size="mini"  type='text'></el-input>
              </el-form-item>
              <el-form-item label="价格">
                <el-input-number v-model="item.price" size="mini" :precision="1" :step="0.1"></el-input-number>
              </el-form-item>
              <el-form-item label="折扣">
                <el-input v-model="item.discount" size="mini"  type='text'></el-input>
              </el-form-item>
              <el-form-item label="设置满减">
               满  <el-input-number v-model="item.fullMinuscount" size="mini" ></el-input-number> 件
                打<el-input-number v-model="item.fullMinusDiscount" size="mini" :precision="1" :step="0.1"></el-input-number> 折
              </el-form-item>
              <el-form-item label="设置会员价">
                <el-input-number v-model="item.memberPrice" size="mini" :precision="1" :step="0.1"></el-input-number>
              </el-form-item>
              <el-form-item label="设置图集">
                  <div class="block" v-for="row in item.images" :key="fit">
                    <el-image
                      style="width: 100px; height: 100px"
                      :src="row.url"
                      fit="fit"></el-image>
                  </div>
              </el-form-item>
            </el-form>
          </el-col>
        </el-row>
      </el-collapse-item>
    </el-collapse>
  </div>
</template>

<script>
  export default {
    name: 'SetSku',
    props: {
      saleAttr: null,
      productAttrDoList: {
        type:Array,
        default:()=>{
          return []
        }
      },
    },
    created() {

    },

    data() {
      return {
      }
    },
    methods: {
      retyrnProductAttrDoList() {
        return this.productAttrDoList;
      }
    }
  }
</script>

<style scoped="scoped">
</style>
